General

In the code samples, Microsoft's Northwind sample database is used. You can find it by seaching "northwind download" at Google.

This database is available for Microsoft Access®  and SQL Server 2000®. In SQL Server 2005® you can attach the SQL Server 2000® .MDF file


Because the generated classes are partial classes, you can create a second part of each class to contain the business logic, for example:

Gen4DO creates a  partial class Employee in the file “Employee_Gen4DO.cs”, so you can add a new class Employee to your project (ensure that is has the same namespace as the generated class):


public partial class Employee

{

    // enter your business logic here

}


Now you have one Employee class which is divided into two source files. This is an easy way to separate your code from the generated code. If you re-generate this class later, your code is not lost.



Important


Before you can use the generated code, you have to set the connection string. This must be done only once at the start of your application:


PersistenceManager.ConnectionString = “your connection string”;